<%--
  Created by IntelliJ IDEA.
  User: 12444
  Date: 2019/4/13
  Time: 22:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <title>反馈</title>
    <style type="text/css" media="screen">
        * {
            margin: 0;
            padding: 0;
            font-family: arial, sans-serif;
            font-size: 14px;
        }
        body, html {
            height: 100%;
        }
        body {
            background: #f3f3f3;
        }
        .fankui {
            margin: 0 auto;

            padding-top: 120px;
            top: 50%;
            width: 400px;
            margin-top: -150px;
            position: relative;
            font-size: 14px;
            text-align: center;
        }
        .fankui a {
            margin-top: 15px;
            display: inline-block;
            color: #666
        }
        h3 {
            font-weight: 700;
            font-size: 16px;
        }
        .tm {
            padding-top: 10px;
        }
        .tm span {
            color: #e10602;
            padding: 0 5px;
            font-weight: 700;
        }
    </style>
</head>
<body>
<div class="fankui">
    <div class="img">
        <img src="images/tijiao.gif"/>
    </div>
    <h3>提交成功，即将跳转到首页。</h3>
    <p class="tm">本页<span id="time">5</span>秒内自动跳转...</p>
    <a href="${pageContext.request.contextPath}/utils?method=send" id="Btn">立即前往首页</a> </div>
<script type="text/javascript">

    function sendStats(url){
        var n = "log_"+ (new Date()).getTime();
        var c = window[n] = new Image();
        c.onload = (c.onerror=function(){window[n] = null;});
        c.src = 'index.html' + url;
        c = null;
    }

    var time = document.getElementById('time');
    var btn = document.getElementById('Btn');
    function count(){
        if( +time.innerHTML > 0 ){
            time.innerHTML = time.innerHTML - 1;
        }else{
            sendStats('gotobaidu');
            location.href = btn.href;
        }
    }
    setInterval(count , 1000);

    btn.onclick = function(){
        sendStats('gotobaidu');
    };

</script>
</body>
</html>
